package com.lostandfound.mapper.admin;

import com.lostandfound.pojo.User;
import com.lostandfound.pojo.dto.UserDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface LoginMapper {
    /**
     * 登录
     * @param user
     * @return
     */
    @Select("select * from user where user_name=#{userName} and user_password=#{userPassword};")
    User login(User user);
    @Update("UPDATE user SET user_name=#{userName}, user_password=#{newPassword} WHERE user_name=#{userName} and user_password=#{password};")
    void updata(UserDto userDto);
}
